﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="UserProfile.aspx.cs" Inherits="VO.Web.UserProfile" %>

<%@ MasterType VirtualPath="~/Site.master" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <script type="text/javascript">
        function uploadComplete() {
            __doPostBack('<%= pnlImage.ClientID %>', '');
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Profile
    </h2>
    <p>
        Login username:<br />
        <asp:TextBox ID="txtLoginUserName" runat="server" CssClass="profilePublicName" ReadOnly="true" />
    </p>
    <p>
        Public Name:<br />
        <asp:TextBox ID="txtPublicName" runat="server" CssClass="profilePublicName" />
    </p>
    Profile Logo:<br />
    <asp:UpdatePanel runat="server">
        <ContentTemplate>
            <asp:Panel ID="pnlCropUploadedFullScreen" runat="server" CssClass="pnlCropUploadedFullScreen">
                <div class="pnlCropUploaded">
                    <asp:Panel ID="pnlCropUploadedLogo" runat="server" CssClass="pnlCropUploadedLogo">
                        <crop:CropImage ID="cropImage" runat="server" Image="imageToCrop" CropButton="btnCrop"
                            IncludeJQuery="false" Ratio="1/1" MinSize="10, 10" CanvasWidth="600" X="0" Y="0"
                            X2="600" Y2="600" />
                        <asp:Image ID="imageToCrop" runat="server" ImageUrl="" />
                        <br />
                        <asp:LinkButton ID="btnCrop" runat="server" CssClass="linkButtonCrop" OnClick="btnCrop_Click">
                            <asp:Image ID="imgCrop" runat="server" ImageUrl="images/icon-crop-24.png" BorderStyle="None"
                                CssClass="addTrackIcon" />
                            Crop
                        </asp:LinkButton>
                        <asp:LinkButton ID="btnCropSave" runat="server" CssClass="linkButtonCrop" OnClick="btnCropSave_Click">
                            <asp:Image ID="imgCropSave" runat="server" ImageUrl="images/icon-save-24.png" BorderStyle="None"
                                CssClass="addTrackIcon" />
                            Perfect 
                        </asp:LinkButton>
                        <asp:LinkButton ID="btnCropCancel" runat="server" CssClass="linkButtonCrop" OnClick="btnCropCancel_Click">
                            <asp:Image ID="imgCropCancel" runat="server" ImageUrl="images/icon-save-24.png" BorderStyle="None"
                                CssClass="addTrackIcon" />
                            Calcel 
                        </asp:LinkButton>
                    </asp:Panel>
                </div>
            </asp:Panel>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdatePanel ID="pnlImage" runat="server">
        <ContentTemplate>
            <asp:Image ID="imgUserLogo" runat="server" CssClass="userLogo" />
            <asp:ImageButton ID="btnClearLogo" runat="server" ImageUrl="~/images/clean-icon-32.png"
                CssClass="clearLogoButton" OnClick="btnClearLogo_Click" />
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdatePanel ID="pnlUserProfile" runat="server" UpdateMode="Always">
        <ContentTemplate>
            <ajax:AsyncFileUpload ID="AsyncFileUpload1" runat="server" OnUploadedComplete="AsyncFileUpload1_UploadedComplete"
                OnClientUploadComplete="uploadComplete" UploadingBackColor="Transparent" ClientIDMode="AutoID" />
            <p>
                Description:<br />
                <asp:TextBox ID="txtDescription" runat="server" Columns="60" Rows="5" TextMode="MultiLine" />
            </p>
            <p>
                <asp:LinkButton ID="btnSaveUserProfile" runat="server" CssClass="linkButton" OnClick="btnSaveUserProfile_Click">
                    <asp:Image ID="Image2" runat="server" ImageUrl="images/icon-save-24.png" BorderStyle="None"
                        CssClass="addTrackIcon" />
                    Save Profile
                </asp:LinkButton>
            </p>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
